<template>
  <el-pagination
    background
    @size-change="handleSizeChange"
    @current-change="handleCurrentChange"
    :current-page="params.pageNum"
    :page-sizes="[10,20,30]"
    :page-size="params.pageSize"
    layout=" prev, pager, next, sizes,jumper"
    :total="total"
  ></el-pagination>
</template>
<script>
export default {
  methods: {
    // 分页
    //数据条数发生变化
    handleSizeChange(newSize) {
      this.params.pageSize = newSize;
      this.get();
    },
    //翻页触发
    handleCurrentChange(currPage) {
      this.params.pageNum = currPage;
      this.get();
    },
  },
  data() {
    return {};
  },
  props: ["total", "params", "get"],
};
</script>
<style lang="less" scope>
</style>